package office.action.hr;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import javax.annotation.Resource;
import office.action.hr.vo.ExamineFormulaVo;
import office.action.hr.vo.ExamineManageVo;
import office.action.hr.vo.ExamineProjectStandardVo;
import office.action.hr.vo.ExamineProjectVo;
import office.action.hr.vo.ExamineSetingVo;
import office.action.hr.vo.ExamineVo;
import office.bo.hr.impl.Examine;
import office.bo.hr.impl.ExamineFormula;
import office.bo.hr.impl.ExamineManage;
import office.bo.hr.impl.ExamineProject;
import office.bo.hr.impl.ExamineProjectStandard;
import office.bo.hr.impl.ExamineSeting;
import office.bo.hr.impl.ExamineType;
import office.bo.hr.impl.FormulaProject;
import office.bo.hr.impl.PersonType;
import office.service.hr.IExamineService;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.interceptor.SessionAware;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import current.security.user.domain.User;
import current.security.user.manager.service.UserManagerService;

import platform.common.action.BaseAction;
import platform.common.bo.Page;
import platform.util.DateUtil;

@Namespace("/examine")
@ParentPackage("struts-base")
@Controller("examineAction")
@Scope("prototype")
public class ExamineAction extends BaseAction implements SessionAware {
	private static final long serialVersionUID = 1L;
	@Resource
	private IExamineService examineService;
	private ExamineManageVo examineManageVo;
	private ExamineFormulaVo examineFormulaVo;
	@Resource
	private UserManagerService userManagerService;
	private ExamineProjectVo examineProjectVo;
	private ExamineProjectStandardVo examineProjectStandardVo;
	private List<ExamineProjectStandardVo> listExamineProjectStandardVo = new ArrayList<ExamineProjectStandardVo>() ;
	private List<ExamineManageVo> listExamineManager = new ArrayList<ExamineManageVo>() ;
	private List<ExamineProjectVo> listExamineProjectVo = new ArrayList<ExamineProjectVo>() ;
	private Map<String,Object> examineSetingMap = new HashMap<String,Object>();
	private Map<String,ExamineFormulaVo> examineFormulaMap = new HashMap<String,ExamineFormulaVo>();
	private Map<String ,User> map = new HashMap<String,User>();
	private Map<String ,String> mapCname = new HashMap<String,String>();
	private List<User> examineSetingUserList = new ArrayList<User>();
	private Map<String,String> formulaMap = new HashMap<String,String>();
	private Map<String,Double> personTotalMap = new HashMap<String,Double>();
	//来自哪个人
	private User fromUser;
	private User toUser;
	//被评价人集合
	private List<ExamineSetingVo> toUserList = new ArrayList<ExamineSetingVo>();
	private ExamineSetingVo examineSetingVo;
	//type属性并未在action中使用，用在jsp页面跳转中作为中转参数。
	private String type;
	private String toUserRoleName;
	private List<ExamineVo> examineVoList = new ArrayList<ExamineVo>();
	private Page page; // 分页信息
	private List<PersonType> personTypeList;
	private Map<Integer, List<ExamineType>> examineTypeMap = new TreeMap<Integer,List<ExamineType>>();;

	//对所有激活状态的人员进行绩效考核设置。
	@Action(value="setExamine",results={@Result(location="/pages/hr/examine/setExamine.jsp")})
	public String setExamine(){
		try{
			examineSetingUserList = userManagerService.getAllActiveUser();
			List<ExamineFormula> list = examineService.getAllExamineFormula();
			for (Iterator<ExamineFormula> iterator = list.iterator(); iterator.hasNext();) {
				ExamineFormula examineFormula = (ExamineFormula) iterator.next();
				ExamineFormulaVo examineFormulaVo = new ExamineFormulaVo();
				try {
					BeanUtils.copyProperties(examineFormulaVo,examineFormula);
				} catch (Exception e) {
					log.error("", e);
				}
				examineFormulaMap.put(examineFormula.getUserId(), examineFormulaVo);
			}
			
			for (Iterator<User> iterator = examineSetingUserList.iterator(); iterator.hasNext();) {
				User user = (User) iterator.next();
				//回显用户修改
				List<ExamineSetingVo> examineSetingVoList = getExamineSetingMapByUserId(user.getId());
				examineSetingMap.put(user.getId(), examineSetingVoList);
			}
		}catch(Exception e){
			log.error("", e);
		}
		return "success";
	}
	
	@Action(value="saveExamineFormula")
	public String saveExamineFormula(){
		try {
			ExamineFormula examineFormula = new ExamineFormula();
			if(examineFormulaVo != null && (examineFormulaVo.getId() == null || examineFormulaVo.getId().equals(""))){
				examineFormulaVo.setId(null);
				BeanUtils.copyProperties(examineFormula,examineFormulaVo);
			}else{
				examineFormula = examineService.getExamineFormulaByUserId(examineFormulaVo.getUserId());
				examineFormula.setFormula(examineFormulaVo.getFormula());
				examineFormula.setType(examineFormulaVo.getType());
				examineFormula.setUserId(examineFormulaVo.getUserId());
				examineFormula.setMemo(examineFormulaVo.getMemo());
			}
			examineService.saveExamineFormula(examineFormula);
			this.getAjaxMessagesJson().setMessage(true, "", "保存成功！");
		} catch (Exception e) {
			log.error("", e);
			this.getAjaxMessagesJson().setMessage(false, "", "保存失败！");
		}  
		return RESULT_AJAXJSON;
	}
	
	@Action(value="setExaminePerson",results={@Result(location="/pages/hr/examine/setExaminePerson.jsp")})
	public String setExaminePerson(){
		try {
			//获取所有用户，应该将范围修改的小一点。
			examineSetingUserList = userManagerService.getAllActiveUser();
			if(examineFormulaVo != null && !examineFormulaVo.getUserId().equals("")){
				//获取此人的计算公式
				ExamineFormula examineFormula = examineService.getExamineFormulaByUserId(examineFormulaVo.getUserId());
				if(examineFormula != null){
					String formula = examineFormula.getFormula();
					if(formula != null && !formula.equals("")){
						String strArray[] = formula.split("\\[");
						for (int i = 0; i < strArray.length; i++) {
							if(strArray[i] != null && !strArray[i].equals("")){
								String s = strArray[i].substring(0,strArray[i].indexOf("]"));
								if(s!=null &&!s.equals("")){
									FormulaProject ep = examineService.getFormulaProjectByName(s);
									formulaMap.put(s, ep.getCname());
								}
							}
						}
					}
				}
				//回显用户修改
				getExamineSetingMapByUserId(examineFormulaVo.getUserId());
			}
		} catch (Exception e) {
			log.error("", e);
		} 
		return "success";
	}
	//设置公式
	@Action(value="setExamineFormula",results={@Result(location="/pages/hr/examine/setExamineFormula.jsp")})
	public String setExamineFormula(){
		ExamineFormula examineFormula = examineService.getExamineFormulaByUserId(examineFormulaVo.getUserId());
		try {
			if(examineFormula != null)
			BeanUtils.copyProperties(examineFormulaVo,examineFormula);
		} catch (Exception e) {
			log.error("",e);
		}
		return "success";
	}
	
	@Action(value="deleteExamineAndManager")
	public String deleteExamineAndManager(){
		examineService.deleteExamineAndManager(examineManageVo.getId());
		this.getAjaxMessagesJson().setMessage(true, "", "删除成功！");
		return RESULT_AJAXJSON;
	}
	
	@Action(value="getAllExamineManage",results={@Result(name="success",location="/pages/hr/examine/examine.jsp")})
	public String getAllExamineManage(){
		if(page == null){
			page = examineService.getAllExamineManageTotalPage();
		}
		List<ExamineManage> list = examineService.getAllExamineManage(page);
		for (Iterator<ExamineManage> iterator = list.iterator(); iterator.hasNext();) {
			ExamineManage examineManage = (ExamineManage) iterator.next();
			ExamineManageVo examineManageVo = new ExamineManageVo();
			try {
				BeanUtils.copyProperties(examineManageVo,examineManage);
				listExamineManager.add(examineManageVo);
			} catch (Exception e) {
				log.error("", e);
			}
		}
		return "success";
	}
	
	@Action(value="saveExamineProject")
	public String saveExamineProject(){
		ExamineProject examineProject = null;
		try {
			
			if(examineProjectVo != null && examineProjectVo.getId() != null && examineProjectVo.getId().equals("")){
				examineProjectVo.setId(null);
				examineProject = new ExamineProject();
			}else{
				examineProject = examineService.getExamineProjectById(examineProjectVo.getId());
			}
			BeanUtils.copyProperties(examineProject,examineProjectVo);
			examineService.saveExamineProject(examineProject);
			this.getAjaxMessagesJson().setMessage(true, "", "保存成功！");
		} catch (Exception e) {
			log.error("", e);
			this.getAjaxMessagesJson().setMessage(true, "", "保存失败！");
		}
		return RESULT_AJAXJSON;
	}
	
	@Action(value="getAllExamineProject",results={@Result(location="/pages/hr/examine/examineProject.jsp")})
	public String getAllExamineProject(){
		List<ExamineProject> list = examineService.getAllExamineProject(null);
		for (Iterator<ExamineProject> iterator = list.iterator(); iterator.hasNext();) {
			ExamineProject examineProject = (ExamineProject) iterator.next();
			ExamineProjectVo examineProjectVo = new ExamineProjectVo();
			try {
				BeanUtils.copyProperties(examineProjectVo,examineProject);
				listExamineProjectVo.add(examineProjectVo);
			} catch (Exception e) {
				log.error("", e);
			}  
		}
		return "success";
	}
	
	@Action(value="getExamineProjectById",results={@Result(location="/pages/hr/examine/examineProjectEdit.jsp")})
	public String getExamineProjectById(){
		ExamineProject examineProject;
		try {
			examineProject = examineService.getExamineProjectById(examineProjectVo.getId());
			BeanUtils.copyProperties(examineProjectVo,examineProject);
		} catch (Exception e) {
			log.error("", e);
		}
		
		return "success";
	}
	
	@Action(value="deleteExamineProjectById",results={@Result(type="redirect",location="getAllExamineProject")})
	public String deleteExamineProjectById(){
		try {
			examineService.deleteExamineProjectById(examineProjectVo.getId());
			this.getAjaxMessagesJson().setMessage(true, "", "删除成功！");
		} catch (Exception e) {
			this.getAjaxMessagesJson().setMessage(false, "", "删除失败，刚数据已经有业务进行关联，不能被删除！");
			log.error("", e);
		}
		return RESULT_AJAXJSON;
	}
	
	@Action(value="saveExamineManager")
	public String saveExamineManager(){
		ExamineManage examineManage = new ExamineManage();
		try {
			BeanUtils.copyProperties(examineManage,examineManageVo);
			examineManage.setThisDate(DateUtil.getDate());
			this.getAjaxMessagesJson().setMessage(true, "", "保存成功！");
		} catch (Exception e) {
			this.getAjaxMessagesJson().setMessage(false, "", "保存失败！");
			log.error("", e);
		} 
		examineService.saveExamineManage(examineManage);
		return RESULT_AJAXJSON;
	}
	
	@Action(value="startExamine",results={@Result(name="one",location="/pages/hr/examine/startExamine.jsp")})
	public String startExamine(){
		try {
			List<ExamineSeting> examineSetings = examineService.getExamineSetingListByFromUserId(getUserId());
			for (Iterator<ExamineSeting> iterator = examineSetings.iterator(); iterator.hasNext();) {
				ExamineSeting examineSeting = (ExamineSeting) iterator.next();
				if(examineSeting.getType() != null){
					if(mapCname.get(examineSeting.getType()) == null){
						mapCname.put(examineSeting.getType(), examineService.getFormulaProjectByName(examineSeting.getType()).getCname());
					}
					ExamineSetingVo examineSetingVo = new ExamineSetingVo();
					BeanUtils.copyProperties(examineSetingVo,examineSeting);
					examineSetingMap.put(examineSeting.getToUserId(), examineSetingVo);
					map.put(examineSeting.getToUserId(), userManagerService.getUserById(examineSeting.getToUserId()));
				}
			}
		} catch (Exception e) {
			log.error("", e);
		} 
		return "one";
	}
	
	@Action(value="doExamine",results={@Result(location="/pages/hr/examine/doExamine.jsp")})
	public String doExamine() {
		ExamineFormula examineFormula = examineService.getExamineFormulaByUserId(toUser.getId());
		List<ExamineProject> list = examineService.getAllExamineProject(examineFormula.getType());
		for (Iterator<ExamineProject> iterator = list.iterator(); iterator.hasNext();) {
			ExamineProject examineProject = (ExamineProject) iterator.next();
			ExamineProjectVo examineProjectVo = new ExamineProjectVo();
			try {
				BeanUtils.copyProperties(examineProjectVo,examineProject);
				List <ExamineProjectStandard> espList = examineService.getExamineProjectStandardByExamineProjectId(examineProject.getId().toString());
				List<ExamineProjectStandardVo> epsvList = new ArrayList<ExamineProjectStandardVo>() ;
				for (Iterator<ExamineProjectStandard> iterator2 = espList.iterator(); iterator2.hasNext();) {
					ExamineProjectStandard examineProjectStandard = (ExamineProjectStandard) iterator2.next();
					ExamineProjectStandardVo espv = new ExamineProjectStandardVo();
					BeanUtils.copyProperties(espv,examineProjectStandard);
					epsvList.add(espv);
				}
				examineProjectVo.setEpsvList(epsvList);
				listExamineProjectVo.add(examineProjectVo);
			} catch (Exception e) {
				log.error("", e);
			}  
		}
		return "success";
	}
	//结束考核
	@Action(value="endExamine",results={@Result(location="/pages/hr/examine/endExamine.jsp")})
	public String endExamine() {
		try {
			List<User> users = userManagerService.getAllActiveUser();
			ExamineManage em = examineService.getExamineManage(examineManageVo.getId());
			String dt = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
			for (User u : users) {
				if(u.getName().equals("admin")) continue;
				Double total = examineService.calculate(u.getId(), em.getId());
				if(total != null && total != 0){
					Examine e = new Examine();
					e.setPdate(dt);
					e.setToUser(u);
					e.setScore(total);
					e.setType("total");
					e.setExamineManagerId(em.getId());
					examineService.saveExamine(e);
					ExamineVo examineVo = new ExamineVo();
					BeanUtils.copyProperties(examineVo,e);
					examineVoList.add(examineVo);
				}
			}
			em.setStatus(0);
			examineService.saveExamineManage(em);
			examineManageVo.setStatus(0);
		} catch (Exception e) {
			log.error("", e);
		}  
		return "success";
	}
	//显示考核结果
	@Action(value="showExamine",results={@Result(location="/pages/hr/examine/endExamine.jsp")})
	public String showExamine() {
		try {
			if(toUser != null && toUser.getId() != null){
				Examine e = examineService.getExamine(null, toUser.getId(), null, examineManageVo.getId());
				ExamineVo examineVo = new ExamineVo();
				BeanUtils.copyProperties(examineVo,e);
				examineVoList.add(examineVo);
			}else{
				List<User> users = userManagerService.getAllActiveUser();
				for (User u : users) {
					if(u.getName().equals("admin")) continue;
					Examine e = examineService.getExamine(null, u.getId(), null, examineManageVo.getId());
					if(e != null){
						ExamineVo examineVo = new ExamineVo();
						BeanUtils.copyProperties(examineVo,e);
						examineVoList.add(examineVo);
					}
				}
			}
			
		} catch (Exception e) {
			log.error("", e);
		}
		return "success";
	}
	//查看考核明细
	@Action(value="getExamineByUid",results={@Result(location="/pages/hr/examine/examineDetail.jsp")})
	public String getExamineByUid() {
		try {
			List<Examine> examineList = examineService.getExamineByUid(toUser.getId(), examineManageVo.getId());
			for(Examine e:examineList){
				ExamineVo examineVo = new ExamineVo();
				ExamineProjectVo epv = new ExamineProjectVo();
				BeanUtils.copyProperties(epv,e.geteProject());
				BeanUtils.copyProperties(examineVo,e);
				examineVo.seteProjectVo(epv);
				examineVoList.add(examineVo);
				if(personTotalMap.get(e.getUser().getId()) != null){
					Double d = personTotalMap.get(e.getUser().getId());
					d = d + e.getScore();
					personTotalMap.put(e.getUser().getId(), d);
				}else{
					personTotalMap.put(e.getUser().getId(), e.getScore());
				}
			}
		} catch (Exception e) {
			log.error("", e);
		}
		return "success";
	}
	//查看考核总结果，每个人的总分
	@Action(value="getExamineTotalByUid",results={@Result(location="/pages/hr/examine/examineTotal.jsp")})
	public String getExamineTotalByUid() {
		try {
			List<Examine> examineList = examineService.getExamineByUid(toUser.getId(), examineManageVo.getId());
			for(Examine e:examineList){
				if(personTotalMap.get(e.getUser().getId()) != null){
					Double d = personTotalMap.get(e.getUser().getId());
					d = d + e.getScore();
					personTotalMap.put(e.getUser().getId(), d);
				}else{
					personTotalMap.put(e.getUser().getId(), e.getScore());
				}
				mapCname.put(e.getUser().getId(), e.getUser().getCname());
			}
		} catch (Exception e) {
			log.error("", e);
		}
		return "success";
	}
	//保存评价
	@Action(value="saveAppraise")
	public String saveAppraise() {
		Examine e = examineService.getExamineById(examineManageVo.getId());
		e.setMemo(examineManageVo.getMemo());
		examineService.saveExamine(e);
		this.getAjaxMessagesJson().setMessage(true, "", "保存成功！");
		return RESULT_AJAXJSON;
	}
	
	@Action(value="saveExamine")
	public String saveExamine() {
		try{
			for (ExamineVo e : examineVoList) {
				if (e != null && e.getScore() != null && e.getScore() > 0) {
					Examine examine = examineService.getExamine(fromUser.getId(), toUser.getId(), e.geteProjectVo().getId(), examineManageVo.getId());
					String dt = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
					if (examine != null) {
						examine.setPdate(dt);
						examine.setScore(e.getScore());
					} else {
						examine = new Examine();
						BeanUtils.copyProperties(examine,e);
						examine.setPdate(dt);
						examine.setUser(fromUser);
						examine.setToUser(toUser);
						examine.setExamineManagerId(examineManageVo.getId());
						ExamineProject examineProject = new ExamineProject();
						examineProject.setId(e.geteProjectVo().getId());
						examine.seteProject(examineProject);
					}
					examineService.saveExamine(examine);
				}
			}
			this.getAjaxMessagesJson().setMessage(true, "", "评分成功！");
		}catch(Exception e){
			log.error("", e);
		}
		return RESULT_AJAXJSON;
	}
	//保存人员设置
	@Action(value="examineSeting")
	public String examineSeting() {
		try{
			Map<String,String> typeMap = new HashMap<String,String>();
			examineService.deleteExamineSetingByToUserId(examineSetingVo.getFromUserId());
			for (Iterator<ExamineSetingVo> iterator = toUserList.iterator(); iterator.hasNext();) {
				ExamineSetingVo type = (ExamineSetingVo) iterator.next();
				if(type != null && type.getType() != null && !type.getType().equals("")){
					ExamineSeting examineSeting = new ExamineSeting();
					examineSeting.setId(type.getId()!=null&&!type.getId().equals("")?type.getId():null);
					//因为设定的是相反的。
					examineSeting.setToUserId(examineSetingVo.getFromUserId());
					examineSeting.setFromUserId(type.getToUserId());
					examineSeting.setType(type.getType());
					examineService.saveExamineSeting(examineSeting);
					typeMap.put(type.getType(), "ok");
				}
			}
			//验证公式是否完整
			StringBuffer stringBuffer = new StringBuffer();
			boolean bool = false;
			ExamineFormula examineFormula = examineService.getExamineFormulaByUserId(examineSetingVo.getFromUserId());
			if(examineFormula != null){
				String formula = examineFormula.getFormula();
				if(formula != null && !formula.equals("")){
					String strArray[] = formula.split("\\[");
					for (int i = 0; i < strArray.length; i++) {
						if(strArray[i] != null && !strArray[i].equals("")){
							String s = strArray[i].substring(0,strArray[i].indexOf("]"));
							if(s!=null &&!s.equals("")){
								FormulaProject ep = examineService.getFormulaProjectByName(s);
								if(typeMap != null){
									if(typeMap.get(ep.getName()) == null){
										stringBuffer.append(ep.getCname()+" ");
										bool = true;
									}
								}
							}
						}
					}
				}
			}
			if(bool){
				this.getAjaxMessagesJson().setMessage(true, "", "此用户的公式为“"+examineFormula.getMemo()+"”，但是您并没有设定公式中的“"+stringBuffer.toString()+"”项，可能会导致计算结果异常！建议重新选择！");
			}else{
				this.getAjaxMessagesJson().setMessage(true, "", "人员设定成功！");
			}
		}catch(Exception e){
			this.getAjaxMessagesJson().setMessage(false, "", "人员设定失败！");
			log.error("", e);
		}
		return RESULT_AJAXJSON;
	}
	
	
	@Action(value="getExamineProjectStandardByExamineProjectId",results={@Result(location="/pages/hr/examine/examineProjectStandard.jsp")})
	public String getExamineProjectStandardByExamineProjectId() {
		try {
			List<ExamineProjectStandard> examineProjectStandardList = examineService.getExamineProjectStandardByExamineProjectId(examineProjectVo.getId());
			if(examineProjectStandardList != null){
				for(ExamineProjectStandard e:examineProjectStandardList){
					ExamineProjectStandardVo epsv = new ExamineProjectStandardVo();
					BeanUtils.copyProperties(epsv,e);
					listExamineProjectStandardVo.add(epsv);
				}
			}
		} catch (Exception e1) {
			log.error("", e1);
		}
		return "success";
	}
	@Action(value="getExamineProjectStandardById",results={@Result(location="/pages/hr/examine/examineProjectStandardEdit.jsp")})
	public String getExamineProjectStandardById(){
		ExamineProjectStandard examineProjectStandard = examineService.getExamineProjectStandardById(examineProjectStandardVo.getId());
		try {
			BeanUtils.copyProperties(examineProjectStandardVo,examineProjectStandard);
		} catch (Exception e) {
			log.error("", e);
		} 
		return "success";
	}
	
	@Action(value="deleteExamineProjectStandardById")
	public String deleteExamineProjectStandardById(){
		try {
			examineService.deleteExamineProjectStandardById(examineProjectStandardVo.getId());
			this.getAjaxMessagesJson().setMessage(true, "", "删除成功！");
		} catch (Exception e) {
			log.error("", e);
		}
		return RESULT_AJAXJSON;
	}
	
	@Action(value="saveExamineProjectStandard")
	public String saveExamineProjectStandard() {
		ExamineProjectStandard examineProjectStandard = new ExamineProjectStandard();
		try {
			BeanUtils.copyProperties(examineProjectStandard,examineProjectStandardVo);
			if(examineProjectStandardVo != null && ( examineProjectStandardVo.getId() == null || examineProjectStandardVo.getId().equals(""))){
				examineProjectStandard.setId(null);
			}
		} catch (Exception e) {
			log.error("", e);
		}
		examineService.saveExamineProjectStandard(examineProjectStandard);
		this.getAjaxMessagesJson().setMessage(true, "", "保存成功！");
		return RESULT_AJAXJSON;
	}
	
	private List<ExamineSetingVo> getExamineSetingMapByUserId(String userId){
		try{
			List<ExamineSetingVo> examineSetingVoList = new ArrayList<ExamineSetingVo>();
			List<ExamineSeting> examineSetings = examineService.getExamineSetingListByToUserId(userId);
			for (Iterator<ExamineSeting> iterator = examineSetings.iterator(); iterator.hasNext();) {
				ExamineSeting examineSeting = (ExamineSeting) iterator.next();
				ExamineSetingVo thisExamineSetingVo = new ExamineSetingVo();
				BeanUtils.copyProperties(thisExamineSetingVo,examineSeting);
				examineSetingVoList.add(thisExamineSetingVo);
				examineSetingMap.put(examineSeting.getFromUserId(), thisExamineSetingVo);
			}
			return examineSetingVoList;
		}catch(Exception e){
			log.error("", e);
		}
		return null;
	}
	//跳转
	@Action(value="gotoExamineProjectStandard",results={@Result(location="/pages/hr/examine/examineProjectStandardEdit.jsp")})
	public String gotoExamineProjectStandard(){
		return "success";
	}
	//跳转
	@Action(value="gotoExamineManage",results={@Result(location="/pages/hr/examine/examineEdit.jsp")})
	public String gotoExamineManage(){
		return "success";
	}
	//跳转
	@Action(value="gotoExamineProject",results={@Result(location="/pages/hr/examine/examineProjectEdit.jsp")})
	public String gotoExamineProject(){
		return "success";
	}
	public IExamineService getExamineService() {
		return examineService;
	}
	public void setExamineService(IExamineService examineService) {
		this.examineService = examineService;
	}
	
	public List<ExamineManageVo> getListExamineManager() {
		return listExamineManager;
	}
	
	public void setListExamineManager(List<ExamineManageVo> listExamineManager) {
		this.listExamineManager = listExamineManager;
	}

	public ExamineManageVo getExamineManageVo() {
		return examineManageVo;
	}

	public void setExamineManageVo(ExamineManageVo examineManageVo) {
		this.examineManageVo = examineManageVo;
	}

	public ExamineProjectVo getExamineProjectVo() {
		return examineProjectVo;
	}

	public void setExamineProjectVo(ExamineProjectVo examineProjectVo) {
		this.examineProjectVo = examineProjectVo;
	}

	public List<ExamineProjectVo> getListExamineProjectVo() {
		return listExamineProjectVo;
	}

	public void setListExamineProjectVo(List<ExamineProjectVo> listExamineProjectVo) {
		this.listExamineProjectVo = listExamineProjectVo;
	}

	public UserManagerService getUserManagerService() {
		return userManagerService;
	}

	public void setUserManagerService(UserManagerService userManagerService) {
		this.userManagerService = userManagerService;
	}

	public User getFromUser() {
		return fromUser;
	}

	public void setFromUser(User fromUser) {
		this.fromUser = fromUser;
	}

	public User getToUser() {
		return toUser;
	}

	public void setToUser(User toUser) {
		this.toUser = toUser;
	}

	public String getToUserRoleName() {
		return toUserRoleName;
	}

	public void setToUserRoleName(String toUserRoleName) {
		this.toUserRoleName = toUserRoleName;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Page getPage() {
		return page;
	}

	public void setPage(Page page) {
		this.page = page;
	}

	public List<PersonType> getPersonTypeList() {
		return personTypeList;
	}

	public void setPersonTypeList(List<PersonType> personTypeList) {
		this.personTypeList = personTypeList;
	}

	public Map<Integer, List<ExamineType>> getExamineTypeMap() {
		return examineTypeMap;
	}

	public void setExamineTypeMap(Map<Integer, List<ExamineType>> examineTypeMap) {
		this.examineTypeMap = examineTypeMap;
	}

	public List<ExamineVo> getExamineVoList() {
		return examineVoList;
	}

	public void setExamineVoList(List<ExamineVo> examineVoList) {
		this.examineVoList = examineVoList;
	}

	public List<ExamineSetingVo> getToUserList() {
		return toUserList;
	}

	public void setToUserList(List<ExamineSetingVo> toUserList) {
		this.toUserList = toUserList;
	}

	public ExamineSetingVo getExamineSetingVo() {
		return examineSetingVo;
	}

	public Map<String, Object> getExamineSetingMap() {
		return examineSetingMap;
	}

	public void setExamineSetingMap(Map<String, Object> examineSetingMap) {
		this.examineSetingMap = examineSetingMap;
	}

	public void setExamineSetingVo(ExamineSetingVo examineSetingVo) {
		this.examineSetingVo = examineSetingVo;
	}

	public List<User> getExamineSetingUserList() {
		return examineSetingUserList;
	}

	public void setExamineSetingUserList(List<User> examineSetingUserList) {
		this.examineSetingUserList = examineSetingUserList;
	}

	public ExamineProjectStandardVo getExamineProjectStandardVo() {
		return examineProjectStandardVo;
	}

	public void setExamineProjectStandardVo(
			ExamineProjectStandardVo examineProjectStandardVo) {
		this.examineProjectStandardVo = examineProjectStandardVo;
	}

	public List<ExamineProjectStandardVo> getListExamineProjectStandardVo() {
		return listExamineProjectStandardVo;
	}

	public void setListExamineProjectStandardVo(
			List<ExamineProjectStandardVo> listExamineProjectStandardVo) {
		this.listExamineProjectStandardVo = listExamineProjectStandardVo;
	}

	public ExamineFormulaVo getExamineFormulaVo() {
		return examineFormulaVo;
	}

	public void setExamineFormulaVo(ExamineFormulaVo examineFormulaVo) {
		this.examineFormulaVo = examineFormulaVo;
	}

	public Map<String, ExamineFormulaVo> getExamineFormulaMap() {
		return examineFormulaMap;
	}

	public void setExamineFormulaMap(Map<String, ExamineFormulaVo> examineFormulaMap) {
		this.examineFormulaMap = examineFormulaMap;
	}

	public Map<String, String> getFormulaMap() {
		return formulaMap;
	}

	public void setFormulaMap(Map<String, String> formulaMap) {
		this.formulaMap = formulaMap;
	}

	public Map<String, User> getMap() {
		return map;
	}

	public void setMap(Map<String, User> map) {
		this.map = map;
	}

	public Map<String, String> getMapCname() {
		return mapCname;
	}

	public void setMapCname(Map<String, String> mapCname) {
		this.mapCname = mapCname;
	}

	public Map<String, Double> getPersonTotalMap() {
		return personTotalMap;
	}

	public void setPersonTotalMap(Map<String, Double> personTotalMap) {
		this.personTotalMap = personTotalMap;
	}
}
